home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / MPW Related / MPW Interfaces & Libraries / PInterfaces / Script.p < prev    next >
Encoding:
Text File  |  1992-06-17  |  36.7 KB  |  1,043 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Tuesday, January 15, 1991 at 8:56 AM
  4.  Script.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1986-1991
  8.   All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT Script;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingScript}
  22. {$SETC UsingScript := 1}
  23.  
  24. {$I+}
  25. {$SETC ScriptIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingTypes}
  28. {$I $$Shell(PInterfaces)Types.p}
  29. {$ENDC}
  30. {$IFC UNDEFINED UsingOSUtils}
  31. {$I $$Shell(PInterfaces)OSUtils.p}
  32. {$ENDC}
  33. {$IFC UNDEFINED UsingQuickdraw}
  34. {$I $$Shell(PInterfaces)Quickdraw.p}
  35. {$ENDC}
  36. {$SETC UsingIncludes := ScriptIncludes}
  37.  
  38. CONST
  39.  
  40. { Script System constants }
  41. smSystemScript = -1;                            {designates system script.}
  42. smCurrentScript = -2;                            {designates current font script.}
  43. smAllScripts = -3;                                {designates any script.}
  44. smRoman = 0;                                    {Roman}
  45. smJapanese = 1;                                    {Japanese}
  46. smTradChinese = 2;                                {Traditional Chinese}
  47. smKorean = 3;                                    {Korean}
  48. smArabic = 4;                                    {Arabic}
  49. smHebrew = 5;                                    {Hebrew}
  50. smGreek = 6;                                    {Greek}
  51. smCyrillic = 7;                                    {Cyrillic}
  52. smRSymbol = 8;                                    {Right-left symbol}
  53. smDevanagari = 9;                                {Devanagari}
  54. smGurmukhi = 10;                                {Gurmukhi}
  55. smGujarati = 11;                                {Gujarati}
  56. smOriya = 12;                                    {Oriya}
  57. smBengali = 13;                                    {Bengali}
  58. smTamil = 14;                                    {Tamil}
  59. smTelugu = 15;                                    {Telugu}
  60. smKannada = 16;                                    {Kannada/Kanarese}
  61. smMalayalam = 17;                                {Malayalam}
  62. smSinhalese = 18;                                {Sinhalese}
  63. smBurmese = 19;                                    {Burmese}
  64. smKhmer = 20;                                    {Khmer/Cambodian}
  65. smThai = 21;                                    {Thai}
  66. smLaotian = 22;                                    {Laotian}
  67. smGeorgian = 23;                                {Georgian}
  68. smArmenian = 24;                                {Armenian}
  69. smSimpChinese = 25;                                {Simplified Chinese}
  70. smTibetan = 26;                                    {Tibetan}
  71. smMongolian = 27;                                {Mongolian}
  72. smGeez = 28;                                    {Geez/Ethiopic}
  73. smEthiopic = 28;                                {Synonym for smGeez}
  74. smEastEurRoman = 29;                            {Synonym for smSlavic}
  75. smVietnamese = 30;                                {Vietnamese}
  76. smExtArabic = 31;                                {extended Arabic}
  77. smUninterp = 32;                                {uninterpreted symbols, e.g. palette symbols}
  78.  
  79. {Obsolete names for script systems (kept for backward compatibility)}
  80. smChinese = 2;                                    {(use smTradChinese or smSimpChinese)}
  81. smRussian = 7;                                    {(old name for smCyrillic)}
  82.  
  83. { smMaldivian = 25;         (no more smMaldivian!)}
  84. smAmharic = 28;                                    {(old name for smGeez)}
  85. smSlavic = 29;                                    {(old name for smEastEurRoman)}
  86. smSindhi = 31;                                    {(old name for smExtArabic)}
  87.  
  88. { Calendar Codes }
  89. calGregorian = 0;
  90. calArabicCivil = 1;
  91. calArabicLunar = 2;
  92. calJapanese = 3;
  93. calJewish = 4;
  94. calCoptic = 5;
  95. calPersian = 6;
  96.  
  97. { Integer Format Codes }
  98. intWestern = 0;
  99. intArabic = 1;
  100. intRoman = 2;
  101. intJapanese = 3;
  102. intEuropean = 4;
  103. intOutputMask = $8000;
  104.  
  105. { CharByte byte types }
  106. smSingleByte = 0;
  107. smFirstByte = -1;
  108. smLastByte = 1;
  109. smMiddleByte = 2;
  110.  
  111. { CharType field masks }
  112. smcTypeMask = $000F;
  113. smcReserved = $00F0;
  114. smcClassMask = $0F00;
  115. smcOrientationMask = $1000;                        {two-byte script glyph orientation}
  116. smcRightMask = $2000;
  117. smcUpperMask = $4000;
  118. smcDoubleMask = $8000;
  119.  
  120. { Basic CharType character types }
  121. smCharPunct = $0000;
  122. smCharAscii = $0001;
  123. smCharEuro = $0007;
  124. smCharExtAscii = $0007;                            { More correct synonym for smCharEuro }
  125.  
  126. { Additional CharType character types for script systems }
  127. smCharKatakana = $0002;                            {Japanese Katakana}
  128. smCharHiragana = $0003;                            {Japanese Hiragana}
  129. smCharIdeographic = $0004;                        {Hanzi, Kanji, Hanja}
  130. smCharTwoByteGreek = $0005;                        {2-byte Greek in Far East systems}
  131. smCharTwoByteRussian = $0006;                    {2-byte Cyrillic in Far East systems}
  132. smCharBidirect = $0008;                            {Arabic/Hebrew}
  133. smCharHangul = $000C;                            {Korean Hangul}
  134. smCharJamo = $000D;                                {Korean Jamo}
  135.  
  136. { old names for some of above, for backward compatibility }
  137. smCharFISKana = $0002;                            {Katakana}
  138. smCharFISGana = $0003;                            {Hiragana}
  139. smCharFISIdeo = $0004;                            {Hanzi, Kanji, Hanja}
  140. smCharFISGreek = $0005;                            {2-byte Greek in Far East systems}
  141. smCharFISRussian = $0006;                        {2-byte Cyrillic in Far East systems}
  142.  
  143. { CharType classes for punctuation (smCharPunct) }
  144. smPunctNormal = $0000;
  145. smPunctNumber = $0100;
  146. smPunctSymbol = $0200;
  147. smPunctBlank = $0300;
  148.  
  149. { Additional CharType classes for punctuation in two-byte systems }
  150. smPunctRepeat = $0400;                            { repeat marker }
  151. smPunctGraphic = $0500;                            { line graphics }
  152.  
  153. { CharType Katakana and Hiragana classes for two-byte systems }
  154. smKanaSmall = $0100;                            {small kana character}
  155. smKanaHardOK = $0200;                            {can have dakuten}
  156. smKanaSoftOK = $0300;                            {can have dakuten or han-dakuten}
  157.  
  158. { CharType Ideographic classes for two-byte systems }
  159. smIdeographicLevel1 = $0000;                    {level 1 char}
  160. smIdeographicLevel2 = $0100;                    {level 2 char}
  161. smIdeographicUser = $0200;                        {user char}
  162.  
  163. { old names for above, for backward compatibility }
  164. smFISClassLvl1 = $0000;                            {level 1 char}
  165. smFISClassLvl2 = $0100;                            {level 2 char}
  166. smFISClassUser = $0200;                            {user char}
  167.  
  168. { CharType Jamo classes for Korean systems }
  169. smJamoJaeum = $0000;                            {simple consonant char}
  170. smJamoBogJaeum = $0100;                            {complex consonant char}
  171. smJamoMoeum = $0200;                            {simple vowel char}
  172. smJamoBogMoeum = $0300;                            {complex vowel char}
  173.  
  174. { CharType glyph orientation for two-byte systems }
  175. smCharHorizontal = $0000;                        { horizontal character form, or for both }
  176. smCharVertical = $1000;                            { vertical character form }
  177.  
  178. { CharType directions }
  179. smCharLeft = $0000;
  180. smCharRight = $2000;
  181.  
  182. { CharType case modifers }
  183. smCharLower = $0000;
  184. smCharUpper = $4000;
  185.  
  186. { CharType character size modifiers (1 or multiple bytes). }
  187. smChar1byte = $0000;
  188. smChar2byte = $8000;
  189.  
  190. { Char2Pixel directions }
  191. smLeftCaret = 0;                                {Place caret for left block}
  192. smRightCaret = -1;                                {Place caret for right block}
  193. smHilite = 1;                                    {Direction is TESysJust}
  194.  
  195. { Transliterate target types for Roman }
  196. smTransAscii = 0;                                {convert to ASCII}
  197. smTransNative = 1;                                {convert to font script}
  198. smTransCase = $FE;                                {convert case for all text}
  199. smTransSystem = $FF;                            {convert to system script}
  200.  
  201. { Transliterate target types for two-byte scripts }
  202. smTransAscii1 = 2;                                {1-byte Roman}
  203. smTransAscii2 = 3;                                {2-byte Roman}
  204. smTransKana1 = 4;                                {1-byte Japanese Katakana}
  205. smTransKana2 = 5;                                {2-byte Japanese Katakana}
  206. smTransGana2 = 7;                                {2-byte Japanese Hiragana (no 1-byte Hiragana)}
  207. smTransHangul2 = 8;                                {2-byte Korean Hangul}
  208. smTransJamo2 = 9;                                {2-byte Korean Jamo}
  209. smTransBopomofo2 = 10;                            {2-byte Chinese Bopomofo}
  210.  
  211. { Transliterate target modifiers }
  212. smTransLower = $4000;                            {target becomes lowercase}
  213. smTransUpper = $8000;                            {target becomes uppercase}
  214.  
  215. { Transliterate source mask - general }
  216. smMaskAll = $FFFFFFFF;                            {Convert all text}
  217.  
  218. { Transliterate source masks }
  219. smMaskAscii = $00000001;                        {2^smTransAscii}
  220. smMaskNative = $00000002;                        {2^smTransNative}
  221.  
  222. { Transliterate source masks for two-byte scripts }
  223. smMaskAscii1 = $00000004;                        {2^smTransAscii1}
  224. smMaskAscii2 = $00000008;                        {2^smTransAscii2}
  225. smMaskKana1 = $00000010;                        {2^smTransKana1}
  226. smMaskKana2 = $00000020;                        {2^smTransKana2}
  227. smMaskGana2 = $00000080;                        {2^smTransGana2}
  228. smMaskHangul2 = $00000100;                        {2^smTransHangul2}
  229. smMaskJamo2 = $00000200;                        {2^smTransJamo2}
  230. smMaskBopomofo2 = $00000400;                    {2^smTransBopomofo2}
  231.  
  232. { Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls. }
  233. smNotInstalled = 0;                                {routine not available in script}
  234. smBadVerb = -1;                                    {Bad verb passed to a routine}
  235. smBadScript = -2;                                {Bad script code passed to a routine}
  236.  
  237. { Values for script redraw flag. }
  238. smRedrawChar = 0;                                {Redraw character only}
  239. smRedrawWord = 1;                                {Redraw entire word (2-byte systems)}
  240. smRedrawLine = -1;                                {Redraw entire line (bidirectional systems)}
  241.  
  242. { GetEnvirons and SetEnvirons verbs }
  243. smVersion = 0;                                    {Script Manager version number}
  244. smMunged = 2;                                    {Globals change count}
  245. smEnabled = 4;                                    {Count of enabled scripts, incl Roman}
  246. smBidirect = 6;                                    {At least one bidirectional script}
  247. smFontForce = 8;                                {Force font flag}
  248. smIntlForce = 10;                                {Force intl flag}
  249. smForced = 12;                                    {Script was forced to system script}
  250. smDefault = 14;                                    {Script was defaulted to Roman script}
  251. smPrint = 16;                                    {Printer action routine}
  252. smSysScript = 18;                                {System script}
  253. smLastScript = 20;                                {Last keyboard script}
  254. smKeyScript = 22;                                {Keyboard script}
  255. smSysRef = 24;                                    {System folder refNum}
  256. smKeyCache = 26;                                {obsolete}
  257. smKeySwap = 28;                                    {Swapping table handle}
  258. smGenFlags = 30;                                {General flags long}
  259. smOverride = 32;                                {Script override flags}
  260. smCharPortion = 34;                                {Ch vs SpExtra proportion}
  261.  
  262. { New for System 7.0: }
  263. smDoubleByte = 36;                                {Flag for double-byte script installed}
  264. smKCHRCache = 38;                                {Returns pointer to KCHR cache}
  265. smRegionCode = 40;                                {Returns current region code (verXxx)}
  266.  
  267. { GetScript and SetScript verbs.
  268. Note: Verbs private to script systems are negative, while
  269. those general across script systems are non-negative. }
  270. smScriptVersion = 0;                            {Script software version}
  271. smScriptMunged = 2;                                {Script entry changed count}
  272. smScriptEnabled = 4;                            {Script enabled flag}
  273. smScriptRight = 6;                                {Right to left flag}
  274. smScriptJust = 8;                                {Justification flag}
  275. smScriptRedraw = 10;                            {Word redraw flag}
  276. smScriptSysFond = 12;                            {Preferred system font}
  277. smScriptAppFond = 14;                            {Preferred Application font}
  278. smScriptBundle = 16;                            {Beginning of itlb verbs}
  279. smScriptNumber = 16;                            {Script itl0 id}
  280. smScriptDate = 18;                                {Script itl1 id}
  281. smScriptSort = 20;                                {Script itl2 id}
  282. smScriptFlags = 22;                                {flags word}
  283. smScriptToken = 24;                                {Script itl4 id}
  284. smScriptEncoding = 26;                            {id of optional itl5, if present}
  285. smScriptLang = 28;                                {Current language for script}
  286. smScriptNumDate = 30;                            {Script Number/Date formats.}
  287. smScriptKeys = 32;                                {Script KCHR id}
  288. smScriptIcon = 34;                                {ID # of SICN or kcs#/kcs4/kcs8 suite}
  289. smScriptPrint = 36;                                {Script printer action routine}
  290. smScriptTrap = 38;                                {Trap entry pointer}
  291. smScriptCreator = 40;                            {Script file creator}
  292. smScriptFile = 42;                                {Script file name}
  293. smScriptName = 44;                                {Script name}
  294.  
  295. { There is a hole here for old Kanji private verbs 46-76 
  296.  
  297.  New for System 7.0: }
  298. smScriptMonoFondSize = 78;                        {default monospace FOND (hi) & size (lo)}
  299. smScriptPrefFondSize = 80;                        {preferred FOND (hi) & size (lo)}
  300. smScriptSmallFondSize = 82;                        {default small FOND (hi) & size (lo)}
  301. smScriptSysFondSize = 84;                        {default system FOND (hi) & size (lo)}
  302. smScriptAppFondSize = 86;                        {default app FOND (hi) & size (lo)}
  303. smScriptHelpFondSize = 88;                        {default Help Mgr FOND (hi) & size (lo)}
  304. smScriptValidStyles = 90;                        {mask of valid styles for script}
  305. smScriptAliasStyle = 92;                        {style (set) to use for aliases}
  306.  
  307. { Negative verbs for KeyScript }
  308. smKeyNextScript = -1;                            { Switch to next available script }
  309. smKeySysScript = -2;                            { Switch to the system script }
  310. smKeySwapScript = -3;                            { Switch to previously-used script }
  311.  
  312. { New for System 7.0: }
  313. smKeyNextKybd = -4;                                { Switch to next keyboard in current keyscript }
  314. smKeySwapKybd = -5;                                { Switch to previously-used keyboard in current keyscript }
  315.  
  316. smKeyDisableKybds = -6;                            { Disable keyboards not in system or Roman script }
  317. smKeyEnableKybds = -7;                            { Re-enable keyboards for all enabled scripts }
  318. smKeyToggleInline = -8;                            { Toggle inline input for current keyscript }
  319. smKeyToggleDirection = -9;                        { Toggle default line direction (TESysJust) }
  320. smKeyNextInputMethod = -10;                        { Switch to next input method in current keyscript }
  321. smKeySwapInputMethod = -11;                        { Switch to last-used input method in current keyscript }
  322.  
  323. smKeyDisableKybdSwitch = -12;                    { Disable switching from the current keyboard }
  324.  
  325.  
  326. { Bits in the smScriptFlags word
  327. (bits above 7 are non-static) }
  328. smsfIntellCP = 0;                                {Script has intelligent cut & paste}
  329. smsfSingByte = 1;                                {Script has only single bytes}
  330. smsfNatCase = 2;                                {Native chars have upper & lower case}
  331. smsfContext = 3;                                {Script is contextual}
  332. smsfNoForceFont = 4;                            {Script will not force characters}
  333. smsfB0Digits = 5;                                {Script has alternate digits at B0-B9}
  334. smsfAutoInit = 6;                                {Auto initialize the script}
  335. smsfForms = 13;                                    {Uses contextual forms for letters}
  336. smsfLigatures = 14;                                {Uses contextual ligatures}
  337. smsfReverse = 15;                                {Reverses native text, right-left}
  338.  
  339. { Bits in the smGenFlags long.
  340. First (high-order) byte is set from itlc flags byte. }
  341. smfShowIcon = 31;                                {Show icon even if only one script}
  342. smfDualCaret = 30;                                {Use dual caret for mixed direction text}
  343. smfNameTagEnab = 29;                            {Reserved for internal use}
  344.  
  345. { Roman script constants 
  346.  
  347.  The following are here for backward compatibility, but should not be used. 
  348.  This information should be obtained using GetScript. }
  349. romanSysFond = $3FFF;                            {system font id number}
  350. romanAppFond = 3;                                {application font id number}
  351. romanFlags = $0007;                                {roman settings}
  352.  
  353. { Script Manager font equates. }
  354. smFondStart = $4000;                            {start from 16K}
  355. smFondEnd = $C000;                                {past end of range at 48K}
  356.  
  357. { Miscellaneous font equates. }
  358. smUprHalfCharSet = $80;                            {first char code in top half of std char set}
  359.  
  360. { Character Set Extensions }
  361. diaeresisUprY = $D9;
  362. fraction = $DA;
  363. intlCurrency = $DB;
  364. leftSingGuillemet = $DC;
  365. rightSingGuillemet = $DD;
  366. fiLigature = $DE;
  367. flLigature = $DF;
  368. dblDagger = $E0;
  369. centeredDot = $E1;
  370. baseSingQuote = $E2;
  371. baseDblQuote = $E3;
  372. perThousand = $E4;
  373. circumflexUprA = $E5;
  374. circumflexUprE = $E6;
  375. acuteUprA = $E7;
  376. diaeresisUprE = $E8;
  377. graveUprE = $E9;
  378. acuteUprI = $EA;
  379. circumflexUprI = $EB;
  380. diaeresisUprI = $EC;
  381. graveUprI = $ED;
  382. acuteUprO = $EE;
  383. circumflexUprO = $EF;
  384. appleLogo = $F0;
  385. graveUprO = $F1;
  386. acuteUprU = $F2;
  387. circumflexUprU = $F3;
  388. graveUprU = $F4;
  389. dotlessLwrI = $F5;
  390. circumflex = $F6;
  391. tilde = $F7;
  392. macron = $F8;
  393. breveMark = $F9;
  394. overDot = $FA;
  395. ringMark = $FB;
  396. cedilla = $FC;
  397. doubleAcute = $FD;
  398. ogonek = $FE;
  399. hachek = $FF;
  400.  
  401. { String2Date status values }
  402. fatalDateTime = $8000;                            {String2Date and String2Time mask to a fatal error}
  403. longDateFound = 1;                                {String2Date mask to long date found}
  404. leftOverChars = 2;                                {String2Date & Time mask to warn of left over characters}
  405. sepNotIntlSep = 4;                                {String2Date & Time mask to warn of non-standard separators}
  406. fieldOrderNotIntl = 8;                            {String2Date & Time mask to warn of non-standard field order}
  407. extraneousStrings = 16;                            {String2Date & Time mask to warn of unparsable strings in text}
  408. tooManySeps = 32;                                {String2Date & Time mask to warn of too many separators}
  409. sepNotConsistent = 64;                            {String2Date & Time mask to warn of inconsistent separators}
  410. tokenErr = $8100;                                {String2Date & Time mask for 'tokenizer err encountered'}
  411. cantReadUtilities = $8200;
  412. dateTimeNotFound = $8400;
  413. dateTimeInvalid = $8800;
  414.  
  415. { TokenType values }
  416. tokenIntl = 4;                                    {the itl resource number of the tokenizer}
  417. tokenEmpty = -1;                                {used internally as an empty flag}
  418. tokenUnknown = 0;                                {chars that do not match a defined token type}
  419. tokenWhite = 1;                                    {white space}
  420. tokenLeftLit = 2;                                {literal begin}
  421. tokenRightLit = 3;                                {literal end}
  422. tokenAlpha = 4;                                    {alphabetic}
  423. tokenNumeric = 5;                                {numeric}
  424. tokenNewLine = 6;                                {new line}
  425. tokenLeftComment = 7;                            {open comment}
  426. tokenRightComment = 8;                            {close comment}
  427. tokenLiteral = 9;                                {literal}
  428. tokenEscape = 10;                                {character escape (e.g. '\' in "\n", "\t")}
  429. tokenAltNum = 11;                                {alternate number (e.g. $B0-B9 in Arabic,Hebrew)}
  430. tokenRealNum = 12;                                {real number}
  431. tokenAltReal = 13;                                {alternate real number}
  432. tokenReserve1 = 14;                                {reserved}
  433. tokenReserve2 = 15;                                {reserved}
  434. tokenLeftParen = 16;                            {open parenthesis}
  435. tokenRightParen = 17;                            {close parenthesis}
  436. tokenLeftBracket = 18;                            {open square bracket}
  437. tokenRightBracket = 19;                            {close square bracket}
  438. tokenLeftCurly = 20;                            {open curly bracket}
  439. tokenRightCurly = 21;                            {close curly bracket}
  440. tokenLeftEnclose = 22;                            {open guillemet}
  441. tokenRightEnclose = 23;                            {close guillemet}
  442. tokenPlus = 24;
  443. tokenMinus = 25;
  444. tokenAsterisk = 26;                                {times/multiply}
  445. tokenDivide = 27;
  446. tokenPlusMinus = 28;                            {plus or minus symbol}
  447. tokenSlash = 29;
  448. tokenBackSlash = 30;
  449. tokenLess = 31;                                    {less than symbol}
  450. tokenGreat = 32;                                {greater than symbol}
  451. tokenEqual = 33;
  452. tokenLessEqual2 = 34;                            {less than or equal, 2 characters (e.g. <=)}
  453. tokenLessEqual1 = 35;                            {less than or equal, 1 character}
  454. tokenGreatEqual2 = 36;                            {greater than or equal, 2 characters (e.g. >=)}
  455. tokenGreatEqual1 = 37;                            {greater than or equal, 1 character}
  456. token2Equal = 38;                                {double equal (e.g. ==)}
  457. tokenColonEqual = 39;                            {colon equal}
  458. tokenNotEqual = 40;                                {not equal, 1 character}
  459. tokenLessGreat = 41;                            {less/greater, Pascal not equal (e.g. <>)}
  460. tokenExclamEqual = 42;                            {exclamation equal, C not equal (e.g. !=)}
  461. tokenExclam = 43;                                {exclamation point}
  462. tokenTilde = 44;                                {centered tilde}
  463. tokenComma = 45;
  464. tokenPeriod = 46;
  465. tokenLeft2Quote = 47;                            {open double quote}
  466. tokenRight2Quote = 48;                            {close double quote}
  467. tokenLeft1Quote = 49;                            {open single quote}
  468. tokenRight1Quote = 50;                            {close single quote}
  469. token2Quote = 51;                                {double quote}
  470. token1Quote = 52;                                {single quote}
  471. tokenSemicolon = 53;
  472. tokenPercent = 54;
  473. tokenCaret = 55;
  474. tokenUnderline = 56;
  475. tokenAmpersand = 57;
  476. tokenAtSign = 58;
  477. tokenBar = 59;                                    {vertical bar}
  478. tokenQuestion = 60;
  479. tokenPi = 61;                                    {lower-case pi}
  480. tokenRoot = 62;                                    {square root symbol}
  481. tokenSigma = 63;                                {capital sigma}
  482. tokenIntegral = 64;                                {integral sign}
  483. tokenMicro = 65;
  484. tokenCapPi = 66;                                {capital pi}
  485. tokenInfinity = 67;
  486. tokenColon = 68;
  487. tokenHash = 69;                                    {e.g. #}
  488. tokenDollar = 70;
  489. tokenNoBreakSpace = 71;                            {non-breaking space}
  490. tokenFraction = 72;
  491. tokenIntlCurrency = 73;
  492. tokenLeftSingGuillemet = 74;
  493. tokenRightSingGuillemet = 75;
  494. tokenPerThousand = 76;
  495. tokenEllipsis = 77;
  496. tokenCenterDot = 78;
  497. tokenNil = 127;
  498. delimPad = -2;
  499.  
  500. { obsolete, misspelled token names kept for backward compatibility }
  501. tokenTilda = 44;
  502. tokenCarat = 55;
  503.  
  504. { the NumberParts indices }
  505. tokLeftQuote = 1;
  506. tokRightQuote = 2;
  507. tokLeadPlacer = 3;
  508. tokLeader = 4;
  509. tokNonLeader = 5;
  510. tokZeroLead = 6;
  511. tokPercent = 7;
  512. tokPlusSign = 8;
  513. tokMinusSign = 9;
  514. tokThousands = 10;
  515. tokSeparator = 12;                                {11 is a reserved field}
  516. tokEscape = 13;
  517. tokDecPoint = 14;
  518. tokEPlus = 15;
  519. tokEMinus = 16;
  520. tokMaxSymbols = 31;
  521.  
  522. curNumberPartsVersion = 1;                        {current version of NumberParts record}
  523. fVNumber = 0;                                    {first version of NumFormatString}
  524.  
  525. { Date equates }
  526. smallDateBit = 31;                                {Restrict valid date/time to range of Time global}
  527. togChar12HourBit = 30;                            {If toggling hour by char, accept hours 1..12 only}
  528. togCharZCycleBit = 29;                            {Modifier for togChar12HourBit: accept hours 0..11 only}
  529. togDelta12HourBit = 28;                            {If toggling hour up/down, restrict to 12-hour range (am/pm)}
  530. genCdevRangeBit = 27;                            {Restrict date/time to range used by genl CDEV}
  531. validDateFields = -1;
  532. maxDateField = 10;
  533.  
  534. eraMask = $0001;
  535. yearMask = $0002;
  536. monthMask = $0004;
  537. dayMask = $0008;
  538. hourMask = $0010;
  539. minuteMask = $0020;
  540. secondMask = $0040;
  541. dayOfWeekMask = $0080;
  542. dayOfYearMask = $0100;
  543. weekOfYearMask = $0200;
  544. pmMask = $0400;
  545. dateStdMask = $007F;                            {default for ValidDate flags and ToggleDate TogglePB.togFlags}
  546.  
  547. { Toggle results }
  548. toggleUndefined = 0;
  549. toggleOK = 1;
  550. toggleBadField = 2;
  551. toggleBadDelta = 3;
  552. toggleBadChar = 4;
  553. toggleUnknown = 5;
  554. toggleBadNum = 6;
  555. toggleOutOfRange = 7;                            {synonym for toggleErr3}
  556. toggleErr3 = 7;
  557. toggleErr4 = 8;
  558. toggleErr5 = 9;
  559.  
  560. { New constants for System 7.0:               
  561.  
  562.   Constants for truncWhere argument in TruncString and TruncText }
  563. smTruncEnd = 0;                                    { Truncate at end }
  564. smTruncMiddle = $4000;                            { Truncate in middle }
  565.  
  566. { Constants for TruncString and TruncText results }
  567. smNotTruncated = 0;                                { No truncation was necessary }
  568. smTruncated = 1;                                { Truncation performed }
  569. smTruncErr = -1;                                { General error }
  570.  
  571. {Constants for styleRunPosition argument in NPortionText, NDrawJust,
  572.  NMeasureJust, NChar2Pixel, and NPixel2Char.}
  573. smOnlyStyleRun = 0;                                { This is the only style run on the line }
  574. smLeftStyleRun = 1;                                { This is leftmost of multiple style runs on the line }
  575. smRightStyleRun = 2;                            { This is rightmost of multiple style runs on the line }
  576. smMiddleStyleRun = 3;                            { There are multiple style runs on the line and this 
  577.  is neither the leftmost nor the rightmost. }
  578.  
  579. TYPE
  580. TokenResults = (tokenOK,tokenOverflow,stringOverflow,badDelim,badEnding,
  581.  crash);
  582.  
  583. LongDateField = (eraField,yearField,monthField,dayField,hourField,minuteField,
  584.  secondField,dayOfWeekField,dayOfYearField,weekOfYearField,pmField,res1Field,
  585.  res2Field,res3Field);
  586.  
  587. StyledLineBreakCode = (smBreakWord,smBreakChar,smBreakOverflow);
  588.  
  589. FormatClass = (fPositive,fNegative,fZero);
  590.  
  591. FormatResultType = (fFormatOK,fBestGuess,fOutOfSynch,fSpuriousChars,fMissingDelimiter,
  592.  fExtraDecimal,fMissingLiteral,fExtraExp,fFormatOverflow,fFormStrIsNAN,
  593.  fBadPartsTable,fExtraPercent,fExtraSeparator,fEmptyFormatString);
  594.  
  595.  
  596. CharByteTable = PACKED ARRAY [0..255] OF SignedByte;
  597. ToggleResults = INTEGER;
  598.  
  599. BreakTablePtr = ^BreakTable;
  600. BreakTable = RECORD
  601.  charTypes: ARRAY [0..255] OF SignedByte;
  602.  tripleLength: INTEGER;
  603.  triples: ARRAY [0..0] OF INTEGER;
  604.  END;
  605.  
  606. { New NBreakTable for System 7.0: }
  607. NBreakTablePtr = ^NBreakTable;
  608. NBreakTable = RECORD
  609.  flags1: SignedByte;
  610.  flags2: SignedByte;
  611.  version: INTEGER;
  612.  classTableOff: INTEGER;
  613.  auxCTableOff: INTEGER;
  614.  backwdTableOff: INTEGER;
  615.  forwdTableOff: INTEGER;
  616.  doBackup: INTEGER;
  617.  reserved: INTEGER;
  618.  charTypes: ARRAY [0..255] OF SignedByte;
  619.  tables: ARRAY [0..0] OF INTEGER;
  620.  END;
  621.  
  622. OffPair = RECORD
  623.  offFirst: INTEGER;
  624.  offSecond: INTEGER;
  625.  END;
  626.  
  627.  
  628. OffsetTable = ARRAY [0..2] OF OffPair;
  629.  
  630. ItlcRecord = RECORD
  631.  itlcSystem: INTEGER;                            {default system script}
  632.  itlcReserved: INTEGER;                            {reserved}
  633.  itlcFontForce: SignedByte;                        {default font force flag}
  634.  itlcIntlForce: SignedByte;                        {default intl force flag}
  635.  itlcOldKybd: SignedByte;                        {MacPlus intl keybd flag}
  636.  itlcFlags: SignedByte;                            {general flags}
  637.  itlcIconOffset: INTEGER;                        {keyboard icon offset; not used in 7.0}
  638.  itlcIconSide: SignedByte;                        {keyboard icon side; not used in 7.0}
  639.  itlcIconRsvd: SignedByte;                        {rsvd for other icon info}
  640.  itlcRegionCode: INTEGER;                        {preferred verXxx code}
  641.  itlcReserved3: ARRAY [0..33] OF SignedByte;    {for future use}
  642.  END;
  643.  
  644. ItlbRecord = RECORD
  645.  itlbNumber: INTEGER;                            {itl0 id number}
  646.  itlbDate: INTEGER;                                {itl1 id number}
  647.  itlbSort: INTEGER;                                {itl2 id number}
  648.  itlbFlags: INTEGER;                            {Script flags}
  649.  itlbToken: INTEGER;                            {itl4 id number}
  650.  itlbEncoding: INTEGER;                            {itl5 ID # (optional; char encoding)}
  651.  itlbLang: INTEGER;                                {current language for script }
  652.  itlbNumRep: SignedByte;                        {number representation code}
  653.  itlbDateRep: SignedByte;                        {date representation code }
  654.  itlbKeys: INTEGER;                                {KCHR id number}
  655.  itlbIcon: INTEGER;                                {ID # of SICN or kcs#/kcs4/kcs8 suite.}
  656.  END;
  657.  
  658. { New ItlbExtRecord structure for System 7.0 }
  659. ItlbExtRecord = RECORD
  660.  base: ItlbRecord;                                {un-extended ItlbRecord}
  661.  itlbLocalSize: LONGINT;                        {size of script's local record}
  662.  itlbMonoFond: INTEGER;                            {default monospace FOND ID}
  663.  itlbMonoSize: INTEGER;                            {default monospace font size}
  664.  itlbPrefFond: INTEGER;                            {preferred FOND ID}
  665.  itlbPrefSize: INTEGER;                            {preferred font size}
  666.  itlbSmallFond: INTEGER;                        {default small FOND ID}
  667.  itlbSmallSize: INTEGER;                        {default small font size}
  668.  itlbSysFond: INTEGER;                            {default system FOND ID}
  669.  itlbSysSize: INTEGER;                            {default system font size}
  670.  itlbAppFond: INTEGER;                            {default application FOND ID}
  671.  itlbAppSize: INTEGER;                            {default application font size}
  672.  itlbHelpFond: INTEGER;                            {default Help Mgr FOND ID}
  673.  itlbHelpSize: INTEGER;                            {default Help Mgr font size}
  674.  itlbValidStyles: Style;                        {set of valid styles for script}
  675.  itlbAliasStyle: Style;                            {style (set) to mark aliases}
  676.  END;
  677.  
  678. MachineLocation = RECORD
  679.  latitude: Fract;
  680.  longitude: Fract;
  681.  CASE INTEGER OF
  682.    0:
  683.   (dlsDelta: SignedByte);                        {signed byte; daylight savings delta}
  684.    1:
  685.   (gmtDelta: LONGINT);                            {must mask - see documentation}
  686.  END;
  687.  
  688.  
  689. String2DateStatus = INTEGER;
  690. TokenType = INTEGER;
  691. DelimType = ARRAY [0..1] OF TokenType;
  692. CommentType = ARRAY [0..3] OF TokenType;
  693.  
  694. TokenRecPtr = ^TokenRec;
  695. TokenRec = RECORD
  696.  theToken: TokenType;
  697.  position: Ptr;                                    {pointer into original source}
  698.  length: LONGINT;                                {length of text in original source}
  699.  stringPosition: StringPtr;                        {Pascal/C string copy of identifier}
  700.  END;
  701.  
  702. TokenBlockPtr = ^TokenBlock;
  703. TokenBlock = RECORD
  704.  source: Ptr;                                    {pointer to stream of characters}
  705.  sourceLength: LONGINT;                            {length of source stream}
  706.  tokenList: Ptr;                                {pointer to array of tokens}
  707.  tokenLength: LONGINT;                            {maximum length of TokenList}
  708.  tokenCount: LONGINT;                            {number tokens generated by tokenizer}
  709.  stringList: Ptr;                                {pointer to stream of identifiers}
  710.  stringLength: LONGINT;                            {length of string list}
  711.  stringCount: LONGINT;                            {number of bytes currently used}
  712.  doString: BOOLEAN;                                {make strings & put into StringList}
  713.  doAppend: BOOLEAN;                                {append to TokenList rather than replace}
  714.  doAlphanumeric: BOOLEAN;                        {identifiers may include numeric}
  715.  doNest: BOOLEAN;                                {do comments nest?}
  716.  leftDelims: ARRAY [0..1] OF TokenType;
  717.  rightDelims: ARRAY [0..1] OF TokenType;
  718.  leftComment: ARRAY [0..3] OF TokenType;
  719.  rightComment: ARRAY [0..3] OF TokenType;
  720.  escapeCode: TokenType;                            {escape symbol code}
  721.  decimalCode: TokenType;
  722.  itlResource: Handle;                            {handle to itl4 resource of current script}
  723.  reserved: ARRAY [0..7] OF LONGINT;                {must be zero!}
  724.  END;
  725.  
  726. UntokenTablePtr = ^UntokenTable;
  727. UntokenTableHandle = ^UntokenTablePtr;
  728. UntokenTable = RECORD
  729.  len: INTEGER;
  730.  lastToken: INTEGER;
  731.  index: ARRAY [0..255] OF INTEGER;                {index table; last = lastToken}
  732.  END;
  733.  
  734. DateCachePtr = ^DateCacheRecord;
  735. DateCacheRecord = PACKED RECORD
  736.  hidden: ARRAY [0..255] OF INTEGER;                {only for temporary use}
  737.  END;
  738.  
  739.  
  740. LongDateTime = comp;
  741.  
  742. LongDateCvt = RECORD
  743.  CASE INTEGER OF
  744.    0:
  745.   (c: Comp);
  746.    1:
  747.   (lHigh: LONGINT;
  748.   lLow: LONGINT);
  749.  END;
  750.  
  751. LongDateRec = RECORD
  752.  CASE INTEGER OF
  753.    0:
  754.   (era: INTEGER;
  755.   year: INTEGER;
  756.   month: INTEGER;
  757.   day: INTEGER;
  758.   hour: INTEGER;
  759.   minute: INTEGER;
  760.   second: INTEGER;
  761.   dayOfWeek: INTEGER;
  762.   dayOfYear: INTEGER;
  763.   weekOfYear: INTEGER;
  764.   pm: INTEGER;
  765.   res1: INTEGER;
  766.   res2: INTEGER;
  767.   res3: INTEGER);
  768.    1:
  769.   (list: ARRAY [0..13] OF INTEGER);                {Index by LongDateField!}
  770.    2:
  771.   (eraAlt: INTEGER;
  772.   oldDate: DateTimeRec);
  773.  END;
  774.  
  775.  
  776. DateDelta = SignedByte;
  777.  
  778. TogglePB = RECORD
  779.  togFlags: LONGINT;                                {caller normally sets low word to dateStdMask=$7F}
  780.  amChars: ResType;                                {from 'itl0', but uppercased}
  781.  pmChars: ResType;                                {from 'itl0', but uppercased}
  782.  reserved: ARRAY [0..3] OF LONGINT;
  783.  END;
  784.  
  785.  
  786. FormatOrder = ARRAY [0..0] OF INTEGER;
  787. FormatOrderPtr = ^FormatOrder;
  788. FormatStatus = INTEGER;
  789.  
  790. WideChar = RECORD
  791.  CASE BOOLEAN OF
  792.    TRUE:
  793.   (a: PACKED ARRAY [0..1] OF CHAR);                {0 is the high order character}
  794.    FALSE:
  795.   (b: INTEGER);
  796.  END;
  797.  
  798. WideCharArr = RECORD
  799.  size: INTEGER;
  800.  data: PACKED ARRAY [0..9] OF WideChar;
  801.  END;
  802.  
  803. NumFormatString = PACKED RECORD
  804.  fLength: Byte;
  805.  fVersion: Byte;
  806.  data: PACKED ARRAY [0..253] OF SignedByte;        {private data}
  807.  END;
  808.  
  809. Itl4Ptr = ^Itl4Rec;
  810. Itl4Handle = ^Itl4Ptr;
  811. Itl4Rec = RECORD
  812.  flags: INTEGER;                                {reserved}
  813.  resourceType: LONGINT;                            {contains 'itl4'}
  814.  resourceNum: INTEGER;                            {resource ID}
  815.  version: INTEGER;                                {version number}
  816.  resHeader1: LONGINT;                            {reserved}
  817.  resHeader2: LONGINT;                            {reserved}
  818.  numTables: INTEGER;                            {number of tables, one-based}
  819.  mapOffset: LONGINT;                            {offset to table that maps byte to token}
  820.  strOffset: LONGINT;                            {offset to routine that copies canonical string}
  821.  fetchOffset: LONGINT;                            {offset to routine that gets next byte of character}
  822.  unTokenOffset: LONGINT;                        {offset to table that maps token to canonical string}
  823.  defPartsOffset: LONGINT;                        {offset to default number parts table}
  824.  resOffset6: LONGINT;                            {reserved}
  825.  resOffset7: LONGINT;                            {reserved}
  826.  resOffset8: LONGINT;                            {reserved}
  827.  END;
  828.  
  829. { New NItl4Rec for System 7.0: }
  830. NItl4Ptr = ^NItl4Rec;
  831. NItl4Handle = ^NItl4Ptr;
  832. NItl4Rec = RECORD
  833.  flags: INTEGER;                                {reserved}
  834.  resourceType: LONGINT;                            {contains 'itl4'}
  835.  resourceNum: INTEGER;                            {resource ID}
  836.  version: INTEGER;                                {version number}
  837.  format: INTEGER;                                {format code}
  838.  resHeader: INTEGER;                            {reserved}
  839.  resHeader2: LONGINT;                            {reserved}
  840.  numTables: INTEGER;                            {number of tables, one-based}
  841.  mapOffset: LONGINT;                            {offset to table that maps byte to token}
  842.  strOffset: LONGINT;                            {offset to routine that copies canonical string}
  843.  fetchOffset: LONGINT;                            {offset to routine that gets next byte of character}
  844.  unTokenOffset: LONGINT;                        {offset to table that maps token to canonical string}
  845.  defPartsOffset: LONGINT;                        {offset to default number parts table}
  846.  whtSpListOffset: LONGINT;                        {offset to white space code list}
  847.  resOffset7: LONGINT;                            {reserved}
  848.  resOffset8: LONGINT;                            {reserved}
  849.  resLength1: INTEGER;                            {reserved}
  850.  resLength2: INTEGER;                            {reserved}
  851.  resLength3: INTEGER;                            {reserved}
  852.  unTokenLength: INTEGER;                        {length of untoken table}
  853.  defPartsLength: INTEGER;                        {length of default number parts table}
  854.  whtSpListLength: INTEGER;                        {length of white space code list}
  855.  resLength7: INTEGER;                            {reserved}
  856.  resLength8: INTEGER;                            {reserved}
  857.  END;
  858.  
  859. NumberPartsPtr = ^NumberParts;
  860. NumberParts = RECORD
  861.  version: INTEGER;
  862.  data: ARRAY [1..31] OF WideChar;                {index by [tokLeftQuote..tokMaxSymbols]}
  863.  pePlus: WideCharArr;
  864.  peMinus: WideCharArr;
  865.  peMinusPlus: WideCharArr;
  866.  altNumTable: WideCharArr;
  867.  reserved: PACKED ARRAY [0..19] OF CHAR;
  868.  END;
  869.  
  870. FVector = RECORD
  871.  start: INTEGER;
  872.  length: INTEGER;
  873.  END;
  874.  
  875.  
  876. TripleInt = ARRAY [0..2] OF FVector;            { index by [fPositive..fZero] }
  877.  
  878. ScriptRunStatus = RECORD
  879.  script: SignedByte;
  880.  variant: SignedByte;
  881.  END;
  882.  
  883.  
  884. { New types for System 7.0:                
  885.  
  886.   type for truncWhere parameter in new TruncString, TruncText }
  887. TruncCode = INTEGER;
  888.  
  889. { type for styleRunPosition parameter in NPixel2Char etc. }
  890. JustStyleCode = INTEGER;
  891.  
  892. FUNCTION FontScript: INTEGER;
  893.  INLINE $2F3C,$8200,$0000,$A8B5;
  894. FUNCTION IntlScript: INTEGER;
  895.  INLINE $2F3C,$8200,$0002,$A8B5;
  896. PROCEDURE KeyScript(code: INTEGER);
  897.  INLINE $2F3C,$8002,$0004,$A8B5;
  898. FUNCTION Font2Script(fontNumber: INTEGER): INTEGER;
  899.  INLINE $2F3C,$8202,$0006,$A8B5;
  900. FUNCTION GetEnvirons(verb: INTEGER): LONGINT;
  901.  INLINE $2F3C,$8402,$0008,$A8B5;
  902. FUNCTION SetEnvirons(verb: INTEGER;param: LONGINT): OSErr;
  903.  INLINE $2F3C,$8206,$000A,$A8B5;
  904. FUNCTION GetScript(script: INTEGER;verb: INTEGER): LONGINT;
  905.  INLINE $2F3C,$8404,$000C,$A8B5;
  906. FUNCTION SetScript(script: INTEGER;verb: INTEGER;param: LONGINT): OSErr;
  907.  INLINE $2F3C,$8208,$000E,$A8B5;
  908. FUNCTION CharByte(textBuf: Ptr;textOffset: INTEGER): INTEGER;
  909.  INLINE $2F3C,$8206,$0010,$A8B5;
  910. FUNCTION CharType(textBuf: Ptr;textOffset: INTEGER): INTEGER;
  911.  INLINE $2F3C,$8206,$0012,$A8B5;
  912. FUNCTION Pixel2Char(textBuf: Ptr;textLen: INTEGER;slop: INTEGER;pixelWidth: INTEGER;
  913.  VAR leadingEdge: BOOLEAN): INTEGER;
  914.  INLINE $2F3C,$820E,$0014,$A8B5;
  915. FUNCTION Char2Pixel(textBuf: Ptr;textLen: INTEGER;slop: INTEGER;offset: INTEGER;
  916.  direction: INTEGER): INTEGER;
  917.  INLINE $2F3C,$820C,$0016,$A8B5;
  918. FUNCTION Transliterate(srcHandle: Handle;dstHandle: Handle;target: INTEGER;
  919.  srcMask: LONGINT): OSErr;
  920.  INLINE $2F3C,$820E,$0018,$A8B5;
  921. PROCEDURE FindWord(textPtr: Ptr;textLength: INTEGER;offset: INTEGER;leadingEdge: BOOLEAN;
  922.  breaks: BreakTablePtr;VAR offsets: OffsetTable);
  923.  INLINE $2F3C,$8012,$001A,$A8B5;
  924. PROCEDURE HiliteText(textPtr: Ptr;textLength: INTEGER;firstOffset: INTEGER;
  925.  secondOffset: INTEGER;VAR offsets: OffsetTable);
  926.  INLINE $2F3C,$800E,$001C,$A8B5;
  927. PROCEDURE DrawJust(textPtr: Ptr;textLength: INTEGER;slop: INTEGER);
  928.  INLINE $2F3C,$8008,$001E,$A8B5;
  929. PROCEDURE MeasureJust(textPtr: Ptr;textLength: INTEGER;slop: INTEGER;charLocs: Ptr);
  930.  INLINE $2F3C,$800C,$0020,$A8B5;
  931. FUNCTION ParseTable(VAR table: CharByteTable): BOOLEAN;
  932.  INLINE $2F3C,$8204,$0022,$A8B5;
  933. FUNCTION GetDefFontSize: INTEGER;
  934.  INLINE $3EB8,$0BA8,$6604,$3EBC,$000C;
  935. FUNCTION GetSysFont: INTEGER;
  936.  INLINE $3EB8,$0BA6;
  937. FUNCTION GetAppFont: INTEGER;
  938.  INLINE $3EB8,$0984;
  939. FUNCTION GetMBarHeight: INTEGER;
  940.  INLINE $3EB8,$0BAA;
  941. FUNCTION GetSysJust: INTEGER;
  942.  INLINE $3EB8,$0BAC;
  943. PROCEDURE SetSysJust(newJust: INTEGER);
  944.  INLINE $31DF,$0BAC;
  945. PROCEDURE ReadLocation(VAR loc: MachineLocation);
  946.  INLINE $205F,$203C,$000C,$00E4,$A051;
  947. PROCEDURE WriteLocation(loc: MachineLocation);
  948.  INLINE $205F,$203C,$000C,$00E4,$A052;
  949. PROCEDURE UprText(textPtr: Ptr;len: INTEGER);
  950.  INLINE $301F,$205F,$A054;
  951. PROCEDURE LwrText(textPtr: Ptr;len: INTEGER);
  952.  INLINE $301F,$205F,$A056;
  953.  
  954.  
  955. {  New for 7.0  }
  956. PROCEDURE LowerText(textPtr: Ptr;len: INTEGER);
  957.  INLINE $301F,$205F,$A056;
  958. PROCEDURE StripText(textPtr: Ptr;len: INTEGER);
  959.  INLINE $301F,$205F,$A256;
  960. PROCEDURE UpperText(textPtr: Ptr;len: INTEGER);
  961.  INLINE $301F,$205F,$A456;
  962. PROCEDURE StripUpperText(textPtr: Ptr;len: INTEGER);
  963.  INLINE $301F,$205F,$A656;
  964.  
  965. FUNCTION StyledLineBreak(textPtr: Ptr;textLen: LONGINT;textStart: LONGINT;
  966.  textEnd: LONGINT;flags: LONGINT;VAR textWidth: Fixed;VAR textOffset: LONGINT): StyledLineBreakCode;
  967.  INLINE $2F3C,$821C,$FFFE,$A8B5;
  968. PROCEDURE GetFormatOrder(ordering: FormatOrderPtr;firstFormat: INTEGER;
  969.  lastFormat: INTEGER;lineRight: BOOLEAN;rlDirProc: Ptr;dirParam: Ptr);
  970.  INLINE $2F3C,$8012,$FFFC,$A8B5;
  971. FUNCTION IntlTokenize(tokenParam: TokenBlockPtr): TokenResults;
  972.  INLINE $2F3C,$8204,$FFFA,$A8B5;
  973. FUNCTION InitDateCache(theCache: DateCachePtr): OSErr;
  974.  INLINE $2F3C,$8204,$FFF8,$A8B5;
  975. FUNCTION String2Date(textPtr: Ptr;textLen: LONGINT;theCache: DateCachePtr;
  976.  VAR lengthUsed: LONGINT;VAR dateTime: LongDateRec): String2DateStatus;
  977.  INLINE $2F3C,$8214,$FFF6,$A8B5;
  978. FUNCTION String2Time(textPtr: Ptr;textLen: LONGINT;theCache: DateCachePtr;
  979.  VAR lengthUsed: LONGINT;VAR dateTime: LongDateRec): String2DateStatus;
  980.  INLINE $2F3C,$8214,$FFF4,$A8B5;
  981. PROCEDURE LongDate2Secs(lDate: LongDateRec;VAR lSecs: LongDateTime);
  982.  INLINE $2F3C,$8008,$FFF2,$A8B5;
  983. PROCEDURE LongSecs2Date(VAR lSecs: LongDateTime;VAR lDate: LongDateRec);
  984.  INLINE $2F3C,$8008,$FFF0,$A8B5;
  985. FUNCTION ToggleDate(VAR lSecs: LongDateTime;field: LongDateField;delta: DateDelta;
  986.  ch: INTEGER;params: TogglePB): ToggleResults;
  987.  INLINE $2F3C,$820E,$FFEE,$A8B5;
  988. FUNCTION Str2Format(inString: Str255;partsTable: NumberParts;VAR outString: NumFormatString): FormatStatus;
  989.  INLINE $2F3C,$820C,$FFEC,$A8B5;
  990. FUNCTION Format2Str(myCanonical: NumFormatString;partsTable: NumberParts;
  991.  VAR outString: Str255;VAR positions: TripleInt): FormatStatus;
  992.  INLINE $2F3C,$8210,$FFEA,$A8B5;
  993. FUNCTION FormatX2Str(x: Extended80;myCanonical: NumFormatString;partsTable: NumberParts;
  994.  VAR outString: Str255): FormatStatus;
  995.  INLINE $2F3C,$8210,$FFE8,$A8B5;
  996. FUNCTION FormatStr2X(source: Str255;myCanonical: NumFormatString;partsTable: NumberParts;
  997.  VAR x: Extended80): FormatStatus;
  998.  INLINE $2F3C,$8210,$FFE6,$A8B5;
  999. FUNCTION PortionText(textPtr: Ptr;textLen: LONGINT): Fixed;
  1000.  INLINE $2F3C,$8408,$0024,$A8B5;
  1001. FUNCTION FindScriptRun(textPtr: Ptr;textLen: LONGINT;VAR lenUsed: LONGINT): ScriptRunStatus;
  1002.  INLINE $2F3C,$820C,$0026,$A8B5;
  1003. FUNCTION VisibleLength(textPtr: Ptr;textLen: LONGINT): LONGINT;
  1004.  INLINE $2F3C,$8408,$0028,$A8B5;
  1005. FUNCTION ValidDate(vDate: LongDateRec;flags: LONGINT;VAR newSecs: LongDateTime): INTEGER;
  1006.  INLINE $2F3C,$820C,$FFE4,$A8B5;
  1007.  
  1008.  
  1009. {  New for 7.0  }
  1010. PROCEDURE NFindWord(textPtr: Ptr;textLength: INTEGER;offset: INTEGER;leadingEdge: BOOLEAN;
  1011.  nbreaks: NBreakTablePtr;VAR offsets: OffsetTable);
  1012.  INLINE $2F3C,$8012,$FFE2,$A8B5;
  1013. FUNCTION TruncString(width: INTEGER;VAR theString: Str255;truncWhere: TruncCode): INTEGER;
  1014.  INLINE $2F3C,$8208,$FFE0,$A8B5;
  1015. FUNCTION TruncText(width: INTEGER;textPtr: Ptr;VAR length: INTEGER;truncWhere: TruncCode): INTEGER;
  1016.  INLINE $2F3C,$820C,$FFDE,$A8B5;
  1017. FUNCTION ReplaceText(baseText: Handle;substitutionText: Handle;key: Str15): INTEGER;
  1018.  INLINE $2F3C,$820C,$FFDC,$A8B5;
  1019. FUNCTION NPixel2Char(textBuf: Ptr;textLen: LONGINT;slop: Fixed;pixelWidth: Fixed;
  1020.  VAR leadingEdge: BOOLEAN;VAR widthRemaining: Fixed;styleRunPosition: JustStyleCode;
  1021.  numer: Point;denom: Point): INTEGER;
  1022.  INLINE $2F3C,$8222,$002E,$A8B5;
  1023. FUNCTION NChar2Pixel(textBuf: Ptr;textLen: LONGINT;slop: Fixed;offset: LONGINT;
  1024.  direction: INTEGER;styleRunPosition: JustStyleCode;numer: Point;denom: Point): INTEGER;
  1025.  INLINE $2F3C,$821C,$0030,$A8B5;
  1026. PROCEDURE NDrawJust(textPtr: Ptr;textLength: LONGINT;slop: Fixed;styleRunPosition: JustStyleCode;
  1027.  numer: Point;denom: Point);
  1028.  INLINE $2F3C,$8016,$0032,$A8B5;
  1029. PROCEDURE NMeasureJust(textPtr: Ptr;textLength: LONGINT;slop: Fixed;charLocs: Ptr;
  1030.  styleRunPosition: JustStyleCode;numer: Point;denom: Point);
  1031.  INLINE $2F3C,$801A,$0034,$A8B5;
  1032. FUNCTION NPortionText(textPtr: Ptr;textLen: LONGINT;styleRunPosition: JustStyleCode;
  1033.  numer: Point;denom: Point): Fixed;
  1034.  INLINE $2F3C,$8412,$0036,$A8B5;
  1035.  
  1036.  
  1037. {$ENDC} { UsingScript }
  1038.  
  1039. {$IFC NOT UsingIncludes}
  1040.  END.
  1041. {$ENDC}
  1042.  
  1043.